package com.jfinal.bbsapp.info;
import com.jfinal.aop.Clear;
import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;
import com.jfinal.core.Path;
import com.jfinal.bbsapp.common.kit.CommonUtils;
@Path("/info")
public class FpController extends Controller {
	@Inject
	private FpService srv;
	
	//最新信息列表
	@Clear
	public void list() {
		renderJson(srv.list());
	}
	
	//更多信息分页列表
	@Clear
	public void plist() {
		int pagecurrent = CommonUtils.getPageNum(getPara("pagecurrent")), pagesize = CommonUtils.getPageSize(getPara("pagesize"));
		renderJson(srv.plist(getRequest().getHeader("token"),pagecurrent,pagesize));
	}
}
